<template>
    <div>
		<div class="container">
			尊敬的{{username}}用户，欢迎登录一档一户管理后台，祝你工作顺利，天天开心！
		</div>
		
    </div>
</template>

<script>
import bus from '../common/bus';
export default {
    name: 'dashboard',
    data() {
        return {
			todayData: [],
			totalData: [],
			
			date: '',
			tableData: [],
			pageIndex: 1,
			pageSize: 10,
			pageTotal: 0,
        }
    },
	created () {
		// this.getData()
		//获取统计数量
		// this.getTableData()
	},
	computed: {
	    username() {
	        let username = localStorage.getItem('member')
			console.log('uu', username)
	        return username ? username : this.name;
	    }
	},
    methods: {
		handleQuery () {
			this.pageIndex = 1
			this.getTableData()
		},
		getTableData () {
			this.$apiPost('Index/dateList', {date: this.date, pageIndex: this.pageIndex, pageSize: this.pageSize}).then(res => {
				this.tableData = res.data.list
			})
		},
		getData () {
			this.$apiPost('Index/getData', {}).then(res => {
				this.todayData = res.data.today
				this.totalData = res.data.total
			})
		},
		pagination (e) {
			this.pageIndex = e
			this.getTableData()
		}
    }
};
</script>

<style scoped>
.el-card{
	border: none !important;
}
.el-col-20 {
	width: 99%;
}
.handle-box {
	margin-bottom: 20px;
}
.handle-select {
	width: 120px;
}
.handle-input {
	width: 200px;
	display: inline-block;
	margin-right: 0px;
}
.table {
	width: 100%;
	font-size: 14px;
}
.red {
	color: #ff0000;
}
.mr10 {
	margin-right: 0px;
}
.table-td-thumb {
	display: block;
	margin: auto;
	width: 40px;
	height: 40px;
}
.el-row {
    margin-bottom: 20px;
}

.grid-content {
    display: flex;
    align-items: center;
    height: 100px;
}

.grid-cont-right {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.grid-num {
    font-size: 30px;
    font-weight: bold;
}

.grid-con-icon {
    font-size: 50px;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    color: #fff;
}

.grid-con-1 .grid-con-icon {
    background: rgb(45, 140, 240);
}

.grid-con-1 .grid-num {
    color: rgb(45, 140, 240);
}

.grid-con-2 .grid-con-icon {
    background: rgb(100, 213, 114);
}

.grid-con-2 .grid-num {
    color: rgb(45, 140, 240);
}

.grid-con-3 .grid-con-icon {
    background: rgb(242, 94, 67);
}

.grid-con-3 .grid-num {
    color: rgb(242, 94, 67);
}

.grid-con-4 .grid-con-icon {
    background: rgb(242 188 67);
}

.grid-con-4 .grid-num {
    color: rgb(242 188 67);
}

.user-info {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
}

.user-avator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.user-info-cont {
    padding-left: 50px;
    flex: 1;
    font-size: 14px;
    color: #999;
}

.user-info-cont div:first-child {
    font-size: 30px;
    color: #222;
}

.user-info-list {
    font-size: 14px;
    color: #999;
    line-height: 25px;
}

.user-info-list span {
    margin-left: 70px;
}

.mgb20 {
    margin-bottom: 20px;
}

.todo-item {
    font-size: 14px;
}

.todo-item-del {
    text-decoration: line-through;
    color: #999;
}

.schart {
    width: 100%;
    height: 300px;
}
</style>
